package base.exa17;

public class CompareToStudy {
    public static void main(String[] args) {
        String str="adcde";
        int a,b,c;
        a = str.compareTo("boy");//小于0
        b = str.compareTo("aba");//大于0
        c = str.compareTo("adcde");//等于0
        System.out.println("a: "+a);
        System.out.println("b: "+b);
        System.out.println("c: "+c);

    }
}
